package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/12/12.
 *
 */
@Entity
@Table(name = "sys_user_role")
@DynamicInsert
@DynamicUpdate
public class SysUserRole extends IDEntityMall {

    @Column(columnDefinition = "bigint(20) comment'用户ID'")
    private Long userInfoId;
    @Column(columnDefinition = "bigint(20) comment'角色ID'")
    private Long roleId;
    @Column(columnDefinition = "bigint(20) comment'平台ID'")
    private Long mallId;

    public Long getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(Long userInfoId) {
        this.userInfoId = userInfoId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    @Override
    public String toString() {
        return "SysUserRole{" +
                "userInfoId=" + userInfoId +
                ", roleId=" + roleId +
                ", id=" + id +
                ", mallId=" + mallId +
                ", dateCreated=" + dateCreated +
                ", lastUpdated=" + lastUpdated +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
